﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
            <Title>DelegateCommand Generic</Title>
            <Shortcut>esCmdmethodgeneric</Shortcut>
        </Header>
        <Snippet>
            <Imports>
                <Import>
                    <Namespace>Mvvm.Base</Namespace>
                </Import>
            </Imports>
            <Declarations>
                <Literal Editable="true">
                    <ID>commandname</ID>
                    <ToolTip>Name of the DelegateCommand.</ToolTip>
                    <Default>MyCommand</Default>
                    <Function>
                    </Function>
                </Literal>
                <Literal Editable="true">
                    <ID>type</ID>
                    <ToolTip>Type of the DelegateCommand's parameter.</ToolTip>
                    <Default>string</Default>
                    <Function>
                    </Function>
                </Literal>
                <Literal Editable="true">
                    <ID>parameterName</ID>
                    <ToolTip>The parameter of the Execute method</ToolTip>
                    <Default>parameter</Default>
                    <Function>
                    </Function>
                </Literal>
            </Declarations>
            <Code Language="csharp">
                <![CDATA[#region $commandname$ 
	
		private DelegateCommand<$type$> _$commandname$;

        /// <summary>
        /// Gets the $commandname$.
        /// </summary>
        public DelegateCommand<$type$> $commandname$
        {
            get
            {
                return _$commandname$ ?? (_$commandname$ = new DelegateCommand<$type$>(Execute$commandname$));
            }
        }

        private void Execute$commandname$($type$ $parameterName$)
        {
            $end$
        }
		
		#endregion]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>